package com.gxa.eshops.portal.repository;

import com.gxa.eshops.portal.entity.domain.Goods;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.RepositoryDefinition;
/**
 * @program: IntelliJ IDEA
 * @description: 由jpa声明,由hibernate实现的基础crud操作的持久化对象
 * 通过创建接口并继承CrudRepository,就获取了基本的api操作
 * @author: Mr.Wang
 * @create: 2022-07-05 16:28
 **/
@SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
@RepositoryDefinition(domainClass = Goods.class,idClass = Long.class)
public interface GoodsRepository extends CrudRepository<Goods,Long> {


    /**
     * 发现货物商品id
     * @param goodsId 商品id
     * @return {@code Goods}
     */
    Goods findGoodsByGoodsId(Long goodsId);

}
